<template>
  <div class="account-detail-div">
    <!-- tab切换 -->
    <a-tabs type="card" :activeKey="activeKey" @change="tabsChange">
      <a-tab-pane :key="'1'" :tab="'提现手续费账单明细'">
        <withdrawCharge :tab="'1'" :curTab="activeKey" :userIdType="userIdType"></withdrawCharge>
      </a-tab-pane>
      <a-tab-pane :key="'2'" :tab="'交易手续费账单明细'">
        <businessCharge :tab="'2'" :curTab="activeKey" :userIdType="userIdType"></businessCharge>
      </a-tab-pane>
      <!-- <a-tab-pane :key="'3'" :tab="'营销分户账户账单明细'">
        <household :tab="'3'" :curTab="activeKey" :userIdType="userIdType"></household>
      </a-tab-pane> -->
    </a-tabs>
  </div>
</template>
<script>
import { findDictNameByValue,createOptionsByDict } from '@/utils/dict'
import withdrawCharge from './components/withdrawCharge';
import businessCharge from './components/businessCharge';
import household from './components/household';

export default {
  name: 'accountDetail',
  components: {
    withdrawCharge,
    businessCharge,
    household
  },
  data() {
    return {
      activeKey: '1', // 当前活动tab
    };
  },
  computed: {
    type() { // 返回本页携带的活跃tab
      return this.$route.query.type || '1';
    },
    userIdType() {
      return this.$store.state.userInfo.userIdType
    }
  },
  created() {
    this.activeKey = this.type || '1'
  },
  mounted() {},
  methods: {
    // tab切换
    tabsChange(val) {
      this.activeKey = val
    }
  }
};
</script>

<style lang="less" scoped></style>
